var tgd = tgd || {};
tgd.Contests = tgd.Contests || {};
tgd.Contests.Darts = tgd.Contests.Darts || {};

tgd.Contests.Darts.ManualFactory = function () {

	this._numDarts = null;
	this._regions = null;
	this._callback = null;

	for (var i = 0; i < this._numRegions; this._regions[i] = i++);

	if (tgd.Contests.Darts.ManualFactory._initialized === undefined) {

		/*
		 * c - { NumDarts, Regions, Callback }
		 */
		tgd.Contests.Darts.ManualFactory.prototype.setConfig = function(c) {
			this._numDarts = c.NumDarts;
			this._regions = c.Regions;
			this._callback = c.Callback;
		}

		tgd.Contests.Darts.ManualFactory.prototype.generateSolution = function() {
			var newSolution = new tgd.Contests.Darts.Solution(this._numDarts, this._regions);
			this._callback(newSolution);
		}

		tgd.Contests.Darts.ManualFactory._initialized = true;
	}
};